package com.decorator.self;

public class Decorator extends Drink {

    private Drink obj;

    public Decorator(Drink obj) {
        this.obj = obj;
    }

    @Override
    public float cost() {
        return super.getCost() + this.obj.cost();
    }

    @Override
    public String getName() {
        return super.getName() + " && " + this.obj.getName();
    }
}
